Page Index
7 A druid数据监控
JL 于 2020-05-14 17:02:02 +08:00 修改了此页面

在nacos相应服务的配置文件的spring.datasource.type.druid下加上以下配置,即可打开druid的数据监控功能

      web-stat-filter: 
        enabled: true
      stat-view-servlet:
        enabled: true
        # 设置白名单,不填则允许所有访问
        allow: 
        url-pattern: /druid/*
        # 控制台管理用户名和密码
        login-username: admin
        login-password: 123456
      filter:
        stat:
            enabled: true
            # 慢SQL记录
            log-slow-sql: true
            slow-sql-millis: 1000
            merge-sql: true
        wall:
            config:
                multi-statement-allow: true

在浏览器中打开http://ip:相应服务端口/druid/login.html访问

  • 如upms服务的访问地址就是http://localhost:5999/druid/login.html